/* eslint-disable react-hooks/rules-of-hooks */
import React from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import "../../../../styles/HuYueYue/detail.scss"
interface Props{}
function detail(props:Props) {

    const {state:record} = useLocation()

    let navigate = useNavigate()
    let goback =()=>{
      navigate(-1)
    }
    return (
        <div className='dangan-detail'>
            <h2>员工绩效档案详情  <button className="goback" onClick={()=>{goback()}}>返回</button></h2>
           <div className='center'> 
            <ul>
                <li>被考核员工  <span>{record.name}</span></li>
                <li>工号    <span>{record.number}</span></li>
                <li>员工部门    <span>{record.type}</span></li>
                <li>员工职位    <span>{record.staff}</span></li>
                <li>参加考核    <span>必须参加</span></li>
                <li>考核次数    <span>{record.count}</span></li>
                <li>考核平均分  <span>{record.average}</span></li>
                <li>评分  <span>评分中</span></li>
                <li>最近一次考核分数    <span>{record.score}</span></li>
                <li>最近一次考核等级    <span>{record.grade}</span></li>
            </ul>
            </div>
        </div>
    );
}

export default detail;